package model;

import java.io.Serializable;
import java.util.EnumSet;
import constants.EObservationType;

public class Observation implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7975347691927096071L;
	private Position location;
	private String observer = "";
	
	private EnumSet<EObservationType> observations;
	private long timeStamp;
	public Observation(Position location, String observer, EnumSet<EObservationType> observations, long timeStamp){
		this.location =location;
		this.observations = observations;
		this.observer = observer;
		this.timeStamp = timeStamp;
	}
	
	public Position getLocation() {
		return location;
	}
	public EnumSet<EObservationType> getObservations(){
		return observations;
	}
	public long getTimeStamp() {
		return timeStamp;
	}
	public boolean hasObservations() {
		return (observations.size() > 0);
	}
	public boolean contains(EObservationType obs){
		if (observations.contains(obs)){
			return true;
		}
		return false;
	}
	public boolean isEmpty(){
		return observations.isEmpty();
	}

	public String getObserver() {
		return observer;
	}
	
}
